1. Field
The following description relates to a method and apparatus for generating a mipmap.
2. Description of Related Art
Texture mapping is a technique used in the computer graphics field for illustrating detailed texture or painting a color on a surface of a virtual 3-dimensional (3D) object. The term “texture” refers to an image attached to a surface of an object during texture mapping. Generally, a 2-dimensional (2D) texture, which is a 2D still image, is used in texture mapping. In texture mapping a technique called mipmapping is utilized to improve a rendering speed and anti-aliasing.
In terms of texture-mapping 3D graphics, a mipmap is a group of bitmap images including a basic texture and textures generated by successively reducing the basic texture in advance to improve a rendering speed. If a mipmap is used, a texture is used in consideration of the size of an object to which the texture is to be attached in a final result. If a texture is an image formed in advance, images of various sizes used as a mipmap may be generally calculated off-line and may be used immediately during a rendering process.
In particular cases, textures prepared in advance may not be used. Render-to-texture is a technique to perform rendering on a texture instead of a screen image while rendering a special effect, such as a surface dynamically reflecting a screen image, generating a texture during execution of a program, and using the generated texture to render another scene. Furthermore, moving pictures are used as a texture in lieu of a still image. For example, to render a TV in virtual space, it is difficult to model an image displayed on a screen of the TV. Therefore, each frame of moving pictures may be used as a texture in a modeled screen image to obtain a same effect as the TV displaying the moving pictures. The technique is referred to as a texture streaming or (dynamic) video texture.
In video texture, a 2D texture to be used for a scene currently being rendered is obtained by calculating a required video frame and decompressing a corresponding frame. Furthermore, in the case of render-to-texture, a texture to be used is generated only after a scene is rendered. The obtained texture is a basic-sized texture, not a mipmap. Therefore, the obtained texture may be used like a general texture, only after generation of a mipmap. In the case of generating a mipmap with respect to each frame during the execution of an application program, the application program may be slowed down, unlike the texture of a general image that may be generated off-line.